<admintpl file="header" />
<style>
	*{margin:0; padding:0;}
	body{font-family: "Microsoft Yahei", "hiragino sans gb", Helvetica, Arial, Tahoma;}
	.c-pages{padding:20px 0; text-align: center;}
	.c-pages.tl{text-align: left;}
	.c-pages span{display: inline-block; margin-right: 5px; font-size:12px; height:28px; line-height: 28px;}
	.c-pages span.col{color: #fe344e; font-weight: 600;}
	.c-pages span a{display: inline-block; margin:0 3px; height:28px; line-height: 28px; text-align: center; padding:0 12px; border:1px solid #ccc; text-decoration: none; border-radius: 2px;}
	.c-pages span a:link,.c-pages span a:active,.c-pages span a:visited{color: #333;}
	.c-pages span a:hover{ color: #157efb; border: 1px solid #157efb;}
	.c-pages span a.active{color: #fff; background: #157efb; border:1px solid #157efb;}
	.c-pages  .current{ color: #fff; background: #157efb; border: 1px solid #157efb; display: inline-block; margin: 0 3px; height: 28px;
		line-height: 28px;
		text-align: center;
		padding: 0 12px;
		text-decoration: none;
		border-radius: 2px;
	}
</style>
</head>
<body>
<div class="wrap">
	<ul class="nav nav-tabs">
		<li class="active"><a>充值记录</a></li>
	</ul>
	<form class="well form-search" method="post" id="forms" action="{:U('Order/pay_record')}">
	充值账号：
			<input type="text" name="accounts" id="accounts" style="width: 150px;height: 15px;margin-right: 20px" value="{$accounts}" placeholder="请输入充值账号">
	支付方式：
		<select name="grade" style="width:100px;margin-right: 20px">
				<option value="0" <?php if($grade==0)echo "selected"; ?>>请选择</option>
				<option value="1" <?php if($grade==1)echo "selected"; ?>>银行转账</option>
				<option value="2" <?php if($grade==2)echo "selected"; ?>>支付宝</option>
				<option value="3" <?php if($grade==3)echo "selected"; ?>>微信</option>
		</select>
		等级：
		<select name="dengji" style="width:80px;margin-right: 20px">
			<option value="0" <?php if($dengji==0)echo "selected"; ?>>请选择</option>
			<option value="1" <?php if($dengji==1)echo "selected"; ?>>VIP1</option>
			<option value="2" <?php if($dengji==2)echo "selected"; ?>>VIP2</option>
			<option value="3" <?php if($dengji==3)echo "selected"; ?>>VIP3</option>
			<option value="4" <?php if($dengji==4)echo "selected"; ?>>VIP4</option>
			<option value="5" <?php if($dengji==5)echo "selected"; ?>>VIP5</option>
			<option value="6" <?php if($dengji==6)echo "selected"; ?>>VIP6</option>
			<option value="7" <?php if($dengji==7)echo "selected"; ?>>VIP7</option>
			<option value="8" <?php if($dengji==8)echo "selected"; ?>>VIP8</option>
			<option value="9" <?php if($dengji==9)echo "selected"; ?>>VIP9</option>
		</select>
	申请时间：
			<input type="text" name="kaishi" id="test1" class="js-datetime" style="width: 150px" value="{$kaishi}">&nbsp;至&nbsp;
			<input type="text" name="jieshu" id="test2" class="js-datetime" style="width: 150px" value="{$jieshu}">&nbsp;&nbsp;
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="{:U('Order/pay_record')}">清空</a>
	</form>
	<form method="post" class="js-ajax-form">
		<table class="table table-hover table-bordered">
			<thead>
			<tr>
				<th style="text-align: center">会员账号</th>
				<th style="text-align: center">交易流水号</th>
				<th style="text-align: center">发起时间</th>
				<th style="text-align: center">等级</th>
				<th style="text-align: center">充值账号</th>
				<th style="text-align: center">充值金额(元)</th>
				<th style="text-align: center">充值方式</th>
				<th style="text-align: center">充值状态</th>
				<th style="text-align: center">操作</th>
			</tr>
			</thead>
			<tbody>
			<foreach name="res" item="vo">
				<tr>
					<td style="text-align: center">{$vo.accounts}</td>
					<td style="text-align: center">{$vo.number}</td>
					<td style="text-align: center">{$vo.ctime|date="Y-m-d H:i:s",###}</td>
					<td style="text-align: center">
					<?php if($vo['score'] < '10'){echo 'VIP1';}
						elseif('10' <= $vo['score'] && $vo['score'] < '200'){echo 'VIP2';}
						elseif('200' <= $vo['score'] && $vo['score'] < '1000'){echo 'VIP3';}
						elseif('1000' <= $vo['score'] && $vo['score'] < '10000'){echo 'VIP4';}
						elseif('10000' <= $vo['score'] && $vo['score'] < '50000'){echo 'VIP5';}
						elseif('50000' <= $vo['score'] && $vo['score'] < '250000'){echo 'VIP6';}
						elseif('250000' <= $vo['score'] && $vo['score'] < '1000000'){echo 'VIP7';}
						elseif('1000000' <= $vo['score'] && $vo['score'] < '5000000'){echo 'VIP8';}
						elseif('5000000' <= $vo['score']){echo 'VIP9';}; ?>

					</td>
					<td style="text-align: center">{$vo.my_name}</td>
					<td style="text-align: center">{$vo.money}</td>
					<td style="text-align: center"><?php if($vo['type']==1){echo "银行转账";}
					           elseif($vo['type']==2){echo "支付宝";}
					           elseif($vo['type']==3){echo "微信";}
							   elseif($vo['type']==4&&$vo['pay_three_id']==4&&$vo['paytype']=='weixin_scan'){echo "智通宝-微信";}
							   elseif($vo['type']==4&&$vo['pay_three_id']==4&&$vo['paytype']=='alipay_scan'){echo "智通宝-支付宝";}
							   elseif($vo['type']==4&&$vo['pay_three_id']==4&&$vo['paytype']=='tenpay_scan'){echo "智通宝-qq钱包";}
							   elseif($vo['type']==4&&$vo['pay_three_id']==4&&$vo['paytype']=='jdpay_scan'){echo "智通宝-京东钱包";}
							   elseif($vo['type']==4&&$vo['pay_three_id']==4&&$vo['paytype']=='bdpay_scan'){echo "智通宝-百度钱包";}
							   elseif($vo['type']==4&&$vo['pay_three_id']==2&&$vo['paytype']=='weixin_scan'){echo "多得宝-微信";}
							   elseif($vo['type']==4&&$vo['pay_three_id']==2&&$vo['paytype']=='alipay_scan'){echo "多得宝-支付宝";}
							   elseif($vo['type']==4&&$vo['pay_three_id']==2&&$vo['paytype']=='qq_scan'){echo "多得宝-QQ扫码";}
							   elseif($vo['type']==4&&$vo['pay_three_id']==2&&$vo['paytype']=='jdpay_scan'){echo "多得宝-京东扫码";}
							   elseif($vo['type']==4&&$vo['pay_three_id']==2&&$vo['paytype']=='ylpay_scan'){echo "多得宝-银联扫码";}
					            ?></td>
					<td style="text-align: center">
						<if condition="$vo.state eq 0">待充值
							<object height="1" width="1" data="/style/yinyue/7499.mp3"></object>
							<elseif condition="$vo.state eq 1"/>已充值
							<elseif condition="$vo.state eq 2"/>已取消
						</if>
					</td>
					<td style="text-align: center">
						<!--<input type="button" style="border: none;background: none" onclick="change({$vo.id});" value="<?php if($vo['state'] == '0'){ echo '完成';}elseif($vo['state'] == '1'){ echo '已充值';}elseif($vo['state'] == '2'){ echo '';}; ?> " class="chongzhi" >-->
						<if condition="$vo.type lt 4">
						<a href="{:U('Order/chongzhi',array('id'=>$vo['id']))}"><?php if($vo["state"] == '0'){ echo "完成";}else{ echo "";}; ?></a>
						<a href="{:U('Order/qx_chongzhi',array('id'=>$vo['id']))}"><?php if($vo["state"] == '0'){ echo "取消";}else{ echo "";}; ?></a>
						</if>
						
					</td>
				</tr>
			</foreach>
			</tbody>
		</table>
		<div class="c-pages tc">
			<span>{$page}第{$p}页/共{$totalpage}页</span>
		</div>
	</form>
<script src="__PUBLIC__/js/common.js"></script>

<script>

	$(function(){
		setInterval(function(){
			location.href=location.href;
		},5000)
	})

</script>
</div>
</body>
</html>